package com.hoas.quickstart.threads.chapter03.chapter03_1_11_4;

public class Run1 {

    public static void main(String[] args) {
        MyStack stack = new MyStack();
        P p = new P( stack );
        C c1 = new C( stack );
        C c2 = new C( stack );
        C c3 = new C( stack );
        C c4 = new C( stack );
        C c5 = new C( stack );

        PThread pThread = new PThread( p );
        CThread cThread1 = new CThread( c1 );
        CThread cThread2 = new CThread( c2 );
        CThread cThread3 = new CThread( c3 );
        CThread cThread4 = new CThread( c4 );
        CThread cThread5 = new CThread( c5 );

        pThread.start();
        cThread1.start();
        cThread2.start();
        cThread3.start();
        cThread4.start();
        cThread5.start();
    }

}
